package com.argticling.model;

import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Column;

@MappedSuperclass
public abstract class Persistent implements Persistable {
    private String id;
    @Column(name = "removed")
    private boolean isRemoved;

    public boolean isRemoved() {
        return isRemoved;
    }

    public void remove(boolean removed, boolean cascade) {
        isRemoved = removed;
    }

    @Id
    @Column(name = "id", updatable = false, nullable = false)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
